Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issue with MLJFlux.train #113

Merged
merged 4 commits into from
Aug 13, 2024

Conversation

pasq-cat
Copy link
Contributor

@pasq-cat pasq-cat commented Aug 12, 2024

this pull request solve an issue that was affecting the MLJ interface that passed unnoticed in the previous pull request. In particular, the chain that was passed to mlj.predict was copied before the training phase instead of after. (part of gsoc 24)

@pasq-cat pasq-cat linked an issue Aug 12, 2024 that may be closed by this pull request
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.47%. Comparing base (1fb618e) to head (d77e6ee).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #113   +/-   ##
=======================================
  Coverage   96.47%   96.47%           
=======================================
  Files          21       21           
  Lines         595      595           
=======================================
  Hits          574      574           
  Misses         21       21           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pasq-cat
Copy link
Contributor Author

pasq-cat commented Aug 12, 2024

@MojiFarmanbar wait

Copy link
Member

@MojiFarmanbar MojiFarmanbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems i have to submit my reviews

@@ -1,8 +1,8 @@
# This file is machine-generated - editing it directly is not advised

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rockdeldiablo, changing the julia version is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MojiFarmanbar yes it shouldn't be a problem.

else
la = chain
end

# Initialize history:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rockdeldiablo , I would suggest to keep this if-else on top as it was because it checks if chain is abstractlaplace or not. moving this piece down before LaplaceRedux.fit doesn't add any logics. if you agree i would suggest the followings:

  • keeping that if-else as it was to check if chain is laplace object
  • line 242 and 243, changing chain to la in for-loop, it would solve the problem
    what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MojiFarmanbar honestly i do not think it would work because
MLJFlux.train_epoch(
model, chain, regularized_optimiser, optimiser_state, X, y
) requires an actual chain not a laplace object

the laplace object is required only by LaplaceRedux.fit which is at the end.

have you tested it?

@MojiFarmanbar MojiFarmanbar merged commit b638fcb into main Aug 13, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

the interface doesn't work as it should
3 participants